﻿using System.Collections.ObjectModel;

namespace FluentViewModel.Test
{
    public sealed class PersonViewModelConfiguration : ConfigureViewModel<IPersonViewModel>
    {
        public PersonViewModelConfiguration() 
        {
            Controller<IViewModelController>();
            Transient();
            Notify(x => x.InitializeCounter);
            Notify(x => x.Name);
            Command(x => x.Save);
            Initialize(x => x.Address, serviceLocator => serviceLocator.Resolve<IAddressViewModel>());
            Initialize(x => x.Family, () => new ObservableCollection<IPersonViewModel>());
            //Model<PersonModel>(c =>
            //{
            //    c.Map(x => x.Name);
            //});
            //Model<TestModel>(c =>
            //{
            //    c.Map(x = x.InitializeCounter);
            //    c.Map(x = x.CommandCounter);
            //});
        }
    }
}